package com.jzj.jzjctripapi.utils;

import com.jzj.jzjctripapi.domain.response.AuthenticationInfoListResponse;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestTemplate;

/**
 * @author Mazhenming
 * @date 2023/11/11 11:12
 * @desciption:
 */
public class HttpUtil {
    public static AuthenticationInfoListResponse sendPostRequest(String url, String json) {
        RestTemplate restTemplate = new RestTemplate();
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON);
        HttpEntity<String> entity = new HttpEntity<>(json, headers);
        restTemplate.postForObject(url, entity, String.class);
        return null;
    }
}
